// 表格数据
export interface DataItem {
  portsId: number;
  portsName: string;
  dirId: number;
  dirName: string;
  portsMsg: string;
  portsProtocol: number;
  portsIp: string;
  portsPath: string;
  portsOutTime: number;
  portsStatus: number;
  portsRequestMethod: number; //1:Get;2:Post
  portsSource: string;
  modifyTime: string;
  addTime: string;
}
export interface DataItems {
  records: DataItem;
  total: number;
  size: number;
  current: number;
  orders: Array<String>;
  optimizeCountSql: boolean;
  searchCount: boolean;
  countId: null;
  maxLimit: null;
  pages: number;
}

//选择框
export interface conditionsType {
  selectValue: string;
  selectValue2: string;
  inputValue: string;
}

// "data": {
//   "records": [
//       {
//           "portsId": 4,
//           "portsName": "族从算次四联",
//           "dirId": 6,
//           "portsSource": "laborum irure in in",
//           "portsMsg": null,
//           "portsProtocol": 1,
//           "portsIp": "68.246.250.187",
//           "portsPath": "et",
//           "portsRequestMethod": 2,
//           "portsOutTime": 30,
//           "portsStatus": 1,
//           "modifyTime": "2022-08-02 08:14:40",
//           "addTime": "2022-08-02 08:14:40"
//       }
//   ],
//   "total": 4,
//   "size": 10,
//   "current": 1,
//   "orders": [],
//   "optimizeCountSql": true,
//   "searchCount": true,
//   "countId": null,
//   "maxLimit": null,
//   "pages": 1
// }

//aside目录部分
export interface DataTree {
  dirId: number;
  dirName: string;
  dirParents: number;
  dirLevel: number;
  children: {
    dirId: number;
    dirName: string;
    dirParents: number;
    dirLevel: number;
  };
}

//名字弹窗接口
export interface portsList {
  portsId: number;
  portsName: string;
  dirId: number;
  portsSource: string;
  portsMsg: string;
  portsProtocol: number; //接口协议(1:http;2:https)
  portsIp: string;
  portsPath: string;
  portsRequestMethod: number; //1:Get;2:Post
  portsOutTime: number;
  portsStatus: number; //接口状态(1:未发布;2:已发布;3:已停用)
  modifyTime: string;
  addTime: string;
}
export interface paramsList {
  paramsId?: number;
  paramsName?: string;
  paramsPath?: number; //参数位置(1:query;2:path)
  paramsType?: number; //参数数据类型(1:String;2:Int;3:Float)
  paramsIsNull?: number; //是否必填(1:否;2:是)
  paramsMsg?: string;
  codesId?: string;
  paramsDefault?: number;
  portsId?: number;
}
export interface returnsList {
  returnId: number;
  returnName: string;
  returnType: number;
  returnParents: number;
  codesId: null;
  returnMsg: string;
  returnLevel: number;
  portsId: number;
}
export interface requestBodsList {
  bodyName: string;
  bodyType: number;
  bodyIsNull: number;
  bodyDefault: string;
  bodyMsg: string;
  bodyParents: number; // 参数类型，数据类型(1:Object;2:String;3:Int;4:Float;5:Array)
  codesId: string;
  portsId: number;
  bodyLevel: number;
}

// 人工注册页面
interface infos {
  errorMsg: string;
  validateStatus: string;
}
export interface DataItemInput {
  portsName?: string;
  dirId?: number;
  codesId: string | null;
  portsId: number | null;
  paramsId?: number | null;
  paramsName: string;
  paramsPath: number | string; //参数位置(1:query;2:path)
  paramsIsNull: number; //是否必填(1:否;2:是)
  paramsType: number | string; //参数数据类型(1:String;2:Int;3:Float)
  paramsDefault: string | null;
  paramsMsg: string | null;
  paramsParents?: number | null;
  errorMsgShows?: {
    paramsName?: infos;
    paramsPath?: infos;
    paramsType?: infos;
    paramsIsNull?: infos;
  };
}
export interface DataItemBody {
  portsName?: string;
  dirId?: number;
  codesId: string | null;
  portsId: number | null;
  bodyId?: number | null;
  bodyName: string;
  bodyLevel: number | string;
  bodyIsNull: number;
  bodyType: number | string;
  bodyDefault: string | null;
  bodyMsg: string | null;
  bodyParents?: number | null; // 参数类型，数据类型(1:Object;2:String;3:Int;4:Float;5:Array)
  children?: DataItemBody[];
  errorMsgShows?: {
    bodyName?: infos;
    bodyType?: infos;
    bodyIsNull?: infos;
  };
}
export interface DataItemBack {
  portsName?: string;
  dirId?: number;
  codesId: string | null;
  portsId: number | null;
  returnId?: number | null;
  returnName: string;
  returnLevel: number | string;
  returnType: number | string;
  returnMsg: string | null;
  returnParents?: number | null;
  children?: DataItemBack[];
  errorMsgShows?: {
    returnName?: infos;
    returnType?: infos;
  };
}

export interface OnePageType {
  portsName: string;
  dirId: number;
  portsSource: string;
  portsProtocol: number; //接口协议(1:http;2:https)
  portsIp: string;
  portsPath: string;
  portsRequestMethod: number; //1:Get;2:Post
  portsOutTime: number;
  portsMsg: string;
  addTime?: string;
  modifyTime?: string;
  portsId?: number;
  portsStatus?: number; //接口状态(1:未发布;2:已发布;3:已停用)
}
